In the technical field of welding and conveyance of a white body of an automobile, a roller machine, as a common workpiece conveying device, plays an important role in conveying material. To fulfill the requirements for high flexibility and fast production cycle, the roller machine is required to convey the workpieces rapidly and smoothly with high accuracy. However, roller machines widely used at present realize the positioning of a conveying trolley by a conventional proximity switch or a grating encoded scale, resulting in low conveying speed, low accuracy and high cost.